{{#extends @html/widget/hp/widget.html}}

{{:widget_class}}wg-calendar{{/:widget_class}}

{{:widget_body}}

	{{!connect "theme/widget/calendar.css"}}
	<h3 class="cm-title-">{{widget.content.month.title}}</h3>
	{{@:cal}}
	<ul class="next-previous-month">
		<li>&larr;&nbsp;<a href="#{{widget.content.pmonth.ts}}" class="pmonth-">{{widget.content.pmonth.title}}</a></li>
		<li><a href="#{{widget.content.nmonth.ts}}" class="nmonth-">{{widget.content.nmonth.title}}</a>&nbsp;&rarr;</li>
	</ul>
{{/:widget_body}}

{{:widget_title}}Календарь{{/:widget_title}}

{{:cal}}
<table class="calendar-" id="cal">
	<tr>
		<th>пн</th>
		<th>вт</th>
		<th>ср</th>
		<th>чт</th>
		<th>пт</th>
		<th class="holiday-">сб</th>
		<th class="holiday-">вс</th>
	</tr>
	{{!for widget.content.month.cal do=@:month}}
	{{:month}}
	<tr>
		{{!for * do=@:day}}
		{{:day}}<td {{?*not_current_month}}class="other-"{{?:}}{{/?}}>{{?*act_day}}<a href="{{*url|safe}}">{{*day}}</a>{{?:}}{{*day}}{{/?}}</td>{{/:day}}
	</tr>
	{{/:month}}
</table>
{{/:cal}}
